<div id="headerPage">
    <span>Itens da solicitação</span>
</div>
<div style="text-align:left; width:550px; margin-left:21%; margin-bottom:2%;" id="box"> 
<fieldset>
            <legend align="right">
                <a class="btNoMaginAndLink open-linkMat" title="Adicionar Item" href="index.php?modulo=solicitacoes&page=gerar&items=1&add-mat=1">Adicionar</a>
            </legend>
            <table class="table" style="margin-top:5px;">
                <thead>
                    <tr>
                        <th width="420px">Item</th>
                        <th align='center' width="50px">Qtd</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    if ($sessao->getVar('matSol') != null) {
                        $i=0;
                        foreach ($sessao->getVar('matSol') as $item){
                            $color = ($i % 2) == 0 ? '#ffffff' : '#e0e0e0';
                            echo "<tr bgcolor='$color'>
                                    <td style='padding-left:4px'>{$item['descricao_item']}</td>
                                    <td align='center'>{$item['quantidade_item']}</td>
                                    <td align=center ><a title='Excluir item' href='index.php?modulo=solicitacoes&page=gerar&items=1&add-mat&nome={$item['descricao_item']}&del=1'>
                                        <img src='app.misc/images/ico_delete.png'></a></td> 
                                </tr>"; 

                            $i++;          
                        }
                    }else{
                        echo "<tr bgcolor=#ffffff align=center >
                              <td colspan=4>Nenhum item Adicionado!</td>
                              </tr>";
                    }
                    ?>
                </tbody>
            </table>
        </fieldset>
</div>
        
<button onclick="javascript:location='index.php?modulo=solicitacoes&page=gerar&save-aquisicao=1'">Salvar</button>        
<button value="Cancelar" onclick="javascript:location='index.php'">Cancelar</button>

<div width="480" id="janela-dialogMat" class="ui-draggable">
    <form id="form-dialogMat" method="POST" action="">
        <label>
            <span>Item</span>
            <input style="width:300px;" type="text" name="item">
        </label>
        <label>
            <span>Qtd</span>
            <input style="width:50px;" type="text" name="item_qtd">
        </label>
    </form>
</div>